#include <cstdio>
#include <algorithm>
using namespace std;

int n, m;
double max_mean[1000010];
int tree_mean[1000010];

int tree_count(int k, double v, int l, int r)
{
    int mid = (l + r) / 2;
    if (l == r)
        return max_mean[k] > v;
    if (max_mean[k] < v)
        return 0;
    if (max_mean[k << 1] <= v)
        return tree_count(k << 1 | 1, v, mid + 1, r);
    else
        return tree_mean[k] - tree_mean[k << 1] + tree_count(k << 1, v, l, mid);
}

int change_tree(int k, int l, int r, int x, double t)
{
    if (l == r)
    {
        max_mean[k] = t;
        tree_mean[k] = 1;
        return 0;
    }
    int mid = (l + r) / 2;
    if (x <= mid)
        change_tree(k << 1, l, mid, x, t);
    else
        change_tree(k << 1 | 1, mid + 1, r, x, t);
    tree_mean[k] = tree_mean[k << 1] + tree_count(k << 1 | 1, max_mean[k << 1], mid + 1, r);
    max_mean[k] = max(max_mean[k << 1], max_mean[k << 1 | 1]);
    return 0;
}

int main()
{
    scanf("%d%d", &n, &m);
    for (int i = 1; i <= m; ++i)
    {
        int x, y;
        scanf("%d%d", &x, &y);
        double t = (double)y / x;
        change_tree(1, 1, n, x, t);
        printf("%d\n", tree_mean[1]);
    }
    return 0;
}